package cn.zl.web.dto.device;

import cn.hutool.core.util.ObjUtil;
import cn.yunbamboos.rest.service.dto.Data;
import cn.yunbamboos.rest.service.dto.out.GenericOutDTO;
import cn.zl.GB28181.core.SyncStatus;

public class SyncDeviceOutDTO extends GenericOutDTO {

    private final SyncStatus status;

    public SyncDeviceOutDTO(SyncStatus status){
        this.status = status;
    }

    @Override
    public void encode(Data data) {
        super.encode(data);
        if(ObjUtil.isNotNull(status)){
            data.set("status", status.encode());
        }
    }
}
